For one thing, you've got more than one CASE ELSE inside the SELECT CASE block.
Check your manual...