First you need to select all the unique id from your table
select distinct id from a_table_you_did_not_name
how you can use that to left join to your columns
select base.id, one.val as c1, two.val as c2 from ( select distinct id from a_table_you_did_not_name ) base left join a_table_you_did_not_name one on one.id = base.id and one.col = 'c1' left join a_table_you_did_not_name two on two.id = base.id and two.col = 'c2'
note: your case is a relatively simple case of this kind of join -- I coded it like this because using my method can be extended to the more complicated cases and still work. There are some other ways for this particular requirement that might be simpler.
specifically the most common one is joining to multiple tables, not all in the same table. My method will still work in those cases.