To lze provést pomocí unpivot . select result from tablename unpivot (result for colnames in (id,col1,col2,col3))