title: NEO4J/Cypher: Use result as condition for new create
body: <p>i want to create a new node based on a return result in cypher. I cant figure out how to use CASE here(I guess thats what i need?)</p>
  
  <p>I shorted the code because the above part is not important. I get a true or false in "result" and want to use this information to create a new node.</p>
  
  <p>......</p>
  
  <pre><code>RETURN ((sum(r.rooms)+_rooms)&lt;=a.allocation and count(r)&gt;0) as result
  </code></pre>
  
  <p>If true then:</p>
  
  <pre><code>CREATE (s:SOMETHING)
  </code></pre>