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,
Andrey

SELECT o.name,CASE WHEN (o.name is null) THEN 1 END,o.expectedDate,
o.actualDate,o.actualDate,o.updatedBy,so.from.name,so.to.name

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>]