Is there any method for nested case statements or Decode or Map in cypher ?
Case when object1 = 'Animal'
then case when object2 = 'CAT' then 1 else 0
when object2 = 'RAT' then 2 else 0
else -9 end
end
There is not Syntax issue, but then the Value from inner case is not passed on to outer case. Tried even alias a variable. I have even tried the following:
case object1 = 'Animal'
when object2 = 'CAT' then 1
when object2 = 'RAT' then 2
end
This even don't work either. As "case object1 = 'Animal'" is not treated as IF condition....guess only in the WHEN.