title: Selecting Table and Field based on value of another table
body: <p>Is it possible to join and select a field from a table, where the table and field name are stored as text within another table?</p>
  
  <p>Say I have the tables TableofValues, TableA, TableB and TableC  as below. </p>
  
  <p>Is is possible to join in the relevant table based on TableName in TableofValues, and then select the field based on FieldName, where the TableRowID = ID in the joined table?</p>
  
  <p>This is SQL Server 2008.</p>
  
  <p>Example set of tables:</p>
  
  <p><img src="https://i.stack.imgur.com/dntLC.png" alt="enter image description here"></p>
  
  <p>Desired Results:</p>
  
  <p><img src="https://s27.postimg.org/f02aw28gv/table_result_wanted.png" alt="enter image description here"></p>