The CASE statement syntax should end with END, not END CASE, as documented.
CASE value-expression …WHEN [ constant | NULL ] THEN statement-list … … [ WHEN [ constant | NULL ] THEN statement-list ] … …ELSE statement-list … END
This correction will appear in the next release of the Sybase IQ document set.