Filling in support for CASE...WHEN... to handle more cases.