Guess you can try something like this ,it might give the needed output:
SELECT * FROM sometable INTO OUTFILE 'out.csv' FORMAT CSVWithNames