I have a below table that I like to convert the second column into rows based on first column.please see below screenshots.
Base Table:

Output Table:

Since I don't know the total rows of the columns so it is needed to apply dynamic sql. I can't figure it . can anyone please help me that would be very much appreciated.
Thanks Arfater