I have a table like this
How to make select result like this using PL/SQL?
NAME_1 | NAME_2 | NAME_3 | NAME_4 |
AA | BB | CC | DD |
Please note that the NAME_1,2,3,X it should be dynamic based on number column. It could be only number 1,2, in that case it will be like this
If it’s 1,2,3 , three rows, it will be