I have data as given below, and I would like to transform it so that it looks like the Final Table:

If it were just one column to convert to rows then it would be easy, but since I have many columns I would like to convert to rows based on these conditions it's quite difficult for me to figure out, so I would greatly appreciate any help! I attached the sample data below too, thanks in advance!