I have a table similar to this small example:
I want to manipulate it to this format:
Here\'s a sample SQL script to create an example input table: