select 'cd', cd from table union all select 'hd', hd from table union all select 'model', model from table union all select 'price', price from table union all select 'ram', ram from table union all select 'speed', speed from table;