title: SQL Dynamic SELECT statement from values stored in a table
body: <p>I have been researching this for a couple of days and feel like I am going around in circles. I have basic knowledge of SQL but there are many areas I do not understand.</p>
  
  <p>I have a table that stores the names and fields of all the other tables in my database.</p>
  
  <pre><code>tblFields
  ===================================================
  
  TableName      FieldName     BookmarkName  
  ---------------------------------------------------
  Customer       FirstName     CustomerFirstName  
  Customer       LastName      CustomerLastName  
  Customer       DOB           CustomerDOB  
  </code></pre>
  
  <p>I want to write a <code>SELECT</code> statement like the following but i am unable to get it work:</p>
  
  <pre><code>SELECT (SELECT [FieldName] FROM [TableName]) FROM tblFields
  </code></pre>
  
  <p>Is this possible? The application I have developed requires this for user customization of reports.</p>