title: Like in CASE statement not evaluating as expected
body: <p>Given this data:</p>
  
  <pre><code>CREATE TABLE tmpTable(
  fldField varchar(10) null);
  
  INSERT INTO tmpTable
  SELECT 'XXX'
  UNION ALL 
  SELECT 'XXX'
  UNION  ALL
  SELECT 'ZZZ'
  UNION  ALL
  SELECT 'ZZZ'
  UNION  ALL
  SELECT 'YYY'
  
  SELECT
  CASE WHEN fldField like 'YYY' THEN 'OTH' ELSE 'XXX' END AS newField
  FROM tmpTable
  </code></pre>
  
  <p>The expected resultset is:<br>
  XXX<br>
  XXX<br>
  XXX<br>
  XXX<br>
  OTH  </p>
  
  <p>What situation would casue SQL server 2000 to NOT find 'YYY'?  And return the following as the resultset:<br>
  XXX<br>
  XXX<br>
  XXX<br>
  XXX<br>
  XXX  </p>
  
  <p>The problem is with the like 'YYY', I have found other ways to write this to get it to work, but I want to know why this exact method doesn't work.  Another difficulty is that it works in most of my SQL Server 2000 environments.  I need to find out what is different between them to cause this.  Thanks for your help.</p>