CASE can't be used for conditional Cypher execution like you're doing here (you can't have SET clauses within it).
You can use CASE to produce a different expression depending on the evaluation, which would make more sense if you were attempting to set one of two different values to the same property, but in this case you're setting different properties depending on the evaluation.
There are two options available for you. You can either use conditional procs from APOC Procedures:
MATCH (n:Node)
// blah, blah, blah
CALL apoc.do.when(n.foo = 'foo',
"SET n.one = 'one'",
"SET n.two = 'two'",
{n:n}) YIELD value
...
Or you can use a trick using FOREACH, which relies on the fact that the FOREACH contents will execute per element in the list, so we use CASE to emit a single element list (to trigger the updating Cypher) or an empty list (no-op). Be aware you need a separate FOREACH for each condition, including the else case:
MATCH (n:Node)
// blah, blah, blah
FOREACH (ignoreme in CASE WHEN n.foo = 'foo' THEN [1] ELSE [] END |
SET n.one = 'one')
FOREACH (ignoreme in CASE WHEN n.foo <> 'foo' THEN [1] ELSE [] END |
SET n.two = 'two')