title: using > in case statement causes syntax error
body: <p>Using the below code gives me a incorrect syntax near '>' the data in the Long field looks like this:</p>
  
  <pre><code>Review Body 3,
  Review body 6,
  Aprentice,
  </code></pre>
  
  <p>I've been going around in cirlces for hours traying to sort this, is it becasue I'm using a text function (Right) in a calc.</p>
  
  <pre><code>SELECT TOP 1000 [Id]
        ,[Short]
        ,[Long]
        ,CASE ISNUMERIC(RIGHT( grade.Long , 1 )) WHEN  cast(RIGHT( shiftname.Long , 1 )as int) &gt; 4  THEN 'Qualified' ELSE 'Unqualified' END  as Grade
  
    FROM [RosterPro_Live].[dbo].[lookup_PostGrade] as grade
  </code></pre>