title: how to query a table using name from another column from another table
body: <p>I am trying to get data from a table where the table name is stored in another table.
  I am trying for select query but not able to get the data.</p>
  <p>example</p>
  <pre><code>t1
  table name | some data
  
  t2 - table name is same coming from t1
  t2
  id | some data
  </code></pre>
  <p>I need to fetch the t2 name first from t1 that I am able to do. but using that query response I am not sure how to fetch the second query as the result is coming from first query.
  Any help is appreciated.</p>
  <p>Thanks</p>