title: use column names from inner query select the columns to display in outer query
body: <p>My scenario is as follows( in MySQL)
  I have a table say table 1, which has 2 columns:</p>
  
  <p>userID, column_acess</p>
  
  <p>Table 2 which has a list of columns say col1,col2,col3, etc.</p>
  
  <p>Now What I would like to do is use pymySQL to query table 1 for the columns a particular userID is allowed to acesss, by inspecting the column, acess field ( which will contain a comma seperated list of columns in tabl2), and use that result in another sql query ( which works on table2) to actually get the data from the respective columns a user is allowed to acess.</p>
  
  <p>So essentially I would like something like:</p>
  
  <p>Select (Select column_acess from tabl1 where user_ID='123') from table2</p>
  
  <p>So inner query should return the list of columns say col1, col2, which would be used to select the columns in the outer query in table2</p>
  
  <p>How do I do that in mySQL?</p>