Here is some documentation showing CASE is supported in SWQL. It's from the OrionSDK Wiki which I highly recommend you take a look at. TDanner and crew have done a great job with it so far. I feel like it was listed in the old SWQL Documentation too, but I can't find the documentation now.
As far as the snippet that you want to replicate from Alex, that looks like SWQL to me since it is using DAYDIFF/HOURDIFF/MINUTEDIFF Functions, which are SWQL functions, not SQL Functions. If it were SQL he would have used DATEDIFF and then declared the datepart as the first argument in the parenthesis. For example:
DATEDIFF(DAY, table.Timestamp, getdate())