title: IF statements inside linq query clause
body: <p>I have written a LINQ query clause,But a error raise up.Can anyone help me out.Thanks in advance:</p>
  
  <pre><code>list = (from cr in dt.AsEnumerable()
  select new Cards
  {
     MemberNumber = cr.Field&lt;string&gt;("MemberNumber"),
     if( cr.Field&lt;int&gt;("CardState")==0)
     {
            CardState ="aaa";
     }
     if( cr.Field&lt;int&gt;("CardState")==1)
     {
       CardState ="bbb";
     }
     if( cr.Field&lt;int&gt;("CardState")==2)
     {
        CardState ="ccc";
     }
    if( cr.Field&lt;int&gt;("CardState")==3)
    {
       CardState ="ddd";
    }
    if( cr.Field&lt;int&gt;("CardState")==4)
    {
      CardState ="eee";
     }
    }).ToList&lt;Cards&gt;();
  </code></pre>