CASE must be inside PROCESS

I am an utter newbie at this, so was totally blocked for about an hour with the ISE giving me syntax errors about the CASE statement that I'd pasted in from a working example.