How to create a pivot table
Use a union. If you want to keep track of the origin for each, you can add a constant column

Select c1 as x, c2 as y, 1 as origin from...
UNION all
Select c3 as x, c4 as y, 2 as origin from...