title: MYSQL join tables based on column data and table name
body: <p>I'm wondering if this its even posible.</p>
  
  <p>I want to join 2 tables based on the data of table 1.
  Example table 1 has column food with its data beeing "hotdog".</p>
  
  <p>And I have a table called hotdog.</p>
  
  <p>IS it possible to do a JOIN like.</p>
  
  <pre><code>SELECT * FROM table1 t join t.food on id = foodid
  </code></pre>
  
  <p>I know it doesnt work but, its even posible, is there a work arround?.</p>
  
  <p>Thanks in advance.</p>