Revert "CASE turned to COALESCE"

This reverts commit 6fc66025acd377074b638ce9e597c49f6e31095c.