JPA Unable to use CASE Then

Whenever I try to use CASE in any JPA/JPQL Query to fill a datasource, the system blows…
There seems to be no spaces between the words in the query in the Case syntax…

Hi Mark,
Could you provide sample JPQL query?

Thank you,

SELECT,CASE WHEN ( is null) THEN 1 END,o.expectedDate,

Here’s a sample. In this case, i get an error as follows:

CommonErrorNode [<unexpected: [@25,36:39='WHEN',<141>,1:36], resync=CASE WHEN (1
=1) THEN 1 END>]