I have a table with the below structure and data.
I want to convert the above data as below table structure.
Please help me to write a SQL Server query to get the output.