title: case statement in select in jpql
body: <p>I have tried the following but not working.</p>
  
  <pre><code>String mainQuerySt = "select o.progressStatus, "
  + " CASE WHEN o.assigneeEmployee IS NOT NULL THEN o.assigneeEmployee.fullNameSt ELSE '' END as assignee "
  + " from Tt o"
  
  em.createQuery(mainQuerySt).getResultList();
  </code></pre>
  
  <p>What is wrong with this? Actually, I want to show assigneeEmployee full name if it is not null and otherwise an empty string.</p>
  
  <p>I am using EclipseLink v2.1 as JPA</p>
  
  <p>Thanks in advnace.</p>
  
  <p><a href="http://wiki.eclipse.org/EclipseLink/UserGuide/JPA/Basic_JPA_Development/Querying/JPQL#WHERE_Clause" rel="nofollow">EclipseLink Tutorial</a></p>