mysql Query Columns to Rows unitid | row1    | row2   | row3   | row4    | row5    | row6 
-----------------------------------------------------------------
200    | sample1 |sample2 | sample3| sample4 | sample5 | sample6


expected OUTPUT

200    
sample1
sample2
sample3
sample4
sample5
sample6
The only easy way to do this is with UNION ALL queries, but with more than one row in your database you may not get the answer you are expecting.

SELECT unitid FROM your_table
UNION ALL
SELECT row1 FROM your_table
UNION ALL
SELECT row2 FROM your_table
UNION ALL
SELECT row3 FROM your_table
UNION ALL
SELECT row4 FROM your_table
UNION ALL
SELECT row5 FROM your_table
UNION ALL
SELECT row6 FROM your_table


If you have two rows, you will get two unitid values, then two row1 values, etc.