mysql Query Columns to Rows
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.