SELECT `COLUMN_NAME`
FROM `INFORMATION_SCHEMA`.`COLUMNS`
WHERE `TABLE_SCHEMA`='yourdatabasename'
AND `TABLE_NAME`='yourtablename';
/*
* Ex:- Selecting name from customer table
*/
SELECT name FROM customer;
/*
* Ex:- Selecting customer i.d and name from customer table
*/
SELECT id, name FROM customer;