title: Replacing field name with variable in select query
body: <p>I want to replace field name with variable to get data from table in PHP and MySQL.</p>
  
  <pre><code>select * from demo where variable-1
  </code></pre>
  
  <p>instead of <code>select * from demo where fieldname=1</code></p>
  
  <p>as there are more than 50 fieldname to be chosen from drowpdown.</p>