title: Create LINQ statement with variable column names
body: <p>I am creating a tree view for a flat table. I have a linq query which returns all distinct values from a column</p>
  
  <pre><code>        public ActionResult Index()
      {
          var result = (from i in db.Items
                       select i.GeoName)
                       .Distinct()
                       .OrderBy(n =&gt; n);
  
          return View(result);
      }
  </code></pre>
  
  <p>This of course returns a view with my beginning nodes (lets hypothetically say 'Node1', 'Node2', and 'Node3').</p>
  
  <p>I would like to then have the user click on a node, and return the contents of that column as well.</p>
  
  <p>How do you do this dynamically?</p>
  
  <p>I was hoping it was as simple (and may well be, I don't know - LINQ newb!) as:</p>
  
  <pre><code>        public ActionResult Index()
      {
          var result = (from i in db.Items
                       select i.passedInColumnName)
                       .Distinct()
                       .OrderBy(n =&gt; n);
  
          return View(result);
      }
  </code></pre>
  
  <p>As always, thanks in advance to you helpful folks.</p>