Combining multiple rows into a single row with multiple columns
SELECT t1.post_id, t1.meta_value, t2.meta_value
FROM postmeta t1, postmeta t2
WHERE t1.post_id = t2.post_id
  AND t1.meta_key = '_wp_attachment_metadata'
  AND t2.meta_key = '_thumbnail_id'


or

SELECT post_id, 
       MAX(CASE WHEN meta_key = '_wp_attachment_metadata' 
                THEN meta_value END), 
       MAX(CASE WHEN meta_key = '_thumbnail_id' 
                THEN meta_value END)
FROM postmeta 
GROUP BY post_id


PS. First query skips post_id, if it have no one (any) of meta-keys, second query gives NULL for according output field in such case.