print column names according to the query result