I want to ORDER BY the case statement, is it possible? How can I do it?
SELECT new com.systemname.to.UserDataHolder(u.userId,
CASE WHEN (u.place.cityId = :cityId) THEN 1 WHEN (u.place.stateId = :stateId) THEN 2 ELSE 3 END)
FROM User u
ORDER BY u.userId DESC