CASE search-expression WHEN expression [, expression [ ... ]] THEN statements [ WHEN expression [, expression [ ... ]] THEN statements ... ] [ ELSE statements]
END CASE;
And it repeats the "END CASE" phrase in other examples.
However, that doesn't work. You have to just use "END".