How to check the columns which are available in a table is correct?

how to get column name s from yml file to our SQL, so I can test the column avaialbility