... WITH CASE WHEN $param =null THEN CREATE (n:product) |n ELSE MATCH(m:product) WHERE ID(m)=$param |m END AS res . . . return res
...
WITH
CASE
WHEN $param =null THEN CREATE (n:product) |n
ELSE MATCH(m:product) WHERE ID(m)=$param |m
END AS res
.
.
.
return res