title: Python MYSQL SELECT with dynamic value
body: <p>I have a query function where I want to place the value dynamically in.</p>
  
  <pre><code>query_values = {
      "column_value": question["value"],
      "value_2": question["value_2"],
      "startdate": date_range["start"],
      "enddate": date_range["end"]
  }
  
  query = (
          "SELECT %(column_value)s FROM ga_ad_matched_query "
          "WHERE (ga_ad_matched_query LIKE %(value_2)s) AND "
          "(stat_date BETWEEN %(enddate)s AND %(startdate)s)"
      )
  cur.execute(query, query_values)
  </code></pre>
  
  <p>All works well but if I use the %(column_values) variable I get the content of question["value"] into the result and not the actual values behind the column. If I don't use the %(column_values) variable but use the regular name of the column insted, everything works out fine. ....but it need this function dynamically so I need to place %(column_values) there.</p>
  
  <p>Is there a Syntax mistake i oversee here?
  Thanks for your help.</p>