As it turns out, the ODBC Driver (the same driver used in MS Access) does not support CASE...WHEN. Instead, use SWITCH:
SELECT * FROM
(
SELECT id, MAX(SWITCH( val='A', 'A')) as Val_1,
MAX(SWITCH( val='B', 'B')) as Val_2
FROM table1 GROUP BY id
)a
WHERE Val_1 IS NULL OR Val_2 IS NULL;
This will produce the same results.