@Chris one thing it looks like you are missing an OR before {memo} LIKE '%z%', but you can simplify this formula a lot using nested conditions
CASE WHEN {memo} LIKE '%x%' OR {memo} LIKE '%y%' OR {memo} LIKE '%z%'
THEN DECODE({postingperiod}, 'Jan 2019', '1', '2')
ELSE DECODE({postingperiod}, 'Jan 2019', '3', '4')
END