title: Dynamic conversion of string into column name. MySQL
body: <p>I have two tables: <code>items</code> and <code>orders</code></p>
  
  <pre><code>items
  --------------
  id (int) | type_1 (int) | type_2  (int)|
  
  orders
  --------------
  id (int) | transaction_type enum ('type_1', 'type_2')
  </code></pre>
  
  <p>Basically, I want to do the following:</p>
  
  <pre><code>select (select transaction_type from orders where id=1) from items;
  </code></pre>
  
  <p>So, the problem is that <code>string</code> returned by <code>select transaction_type from orders where id=1</code>, cannot be converted into column name.</p>