title: Getting value from cfquery when query column is a variable
body: <p>I'm stuck... can't remember how to make this work. The code:</p>
  
  <pre><code>&lt;cfquery name = "getsomething&gt;
     select a, b, c
     from d
     where id = '1'
  &lt;/cfquery&gt;
  &lt;cfloop collection="#arguments#" item="argument"&gt;
      &lt;cfif #StructFind(arguments, argument)# neq #getsomething.argument[0]#&gt;&lt;!--- here's the problem ---&gt;
          do something
      &lt;/cfif&gt;
  &lt;/cfloop&gt;
  </code></pre>
  
  <p>The query returns one record; I need to get the values of each column for that record. The column name is a variable (argument). What syntax do I need to replace </p>
  
  <pre><code> #getsomething.argument[0]#
  </code></pre>
  
  <p>? Thanks.</p>