Table Transformation with SQL?
Something like this might do the trick (here's the SQLFiddle)

SELECT 
Line,
MAX(CASE WHEN `Column` = 'C1' THEN `Value` END) AS C1,
MAX(CASE WHEN `Column` = 'C2' THEN `Value` END) AS C2,
MAX(CASE WHEN `Column` = 'C3' THEN `Value` END) AS C3,
MAX(CASE WHEN `Column` = 'C4' THEN `Value` END) AS C4
FROM YourTable
GROUP BY Line


Like Sascha suggested in their answer, you might want to consider either creating this as a view, or creating a view that looks like Table 2 once you've finished putting the table back to how it was. That should prevent this kind of problem popping up again in the future.