title: How to write IF ELSE conditions in Prolog
body: <p>I am a C# guy and very new to prolog. I need to write a prolog program for the following scenario. Can anyone please help to achieve it.</p>
  
  <p>Two person share a chest of drawers. Chest have 4 drawers and Drawer 1 and 2 belongs to Person1 and Drawer 3 and 4 belongs to Person2. </p>
  
  <p>They keep their Mobile phone, wallets and books in drawers. Person2 lost his phone in drawers. He checked in drawer 3 and 4 which belongs to him but could not find his phone. Then he checked drawers 1 and 2 and found it in drawer 2. I need to write prolog code for this scenario.  </p>
  
  <pre><code>person(person1).
  person(person2).
  
  drawers(drawer1).
  drawers(drawer2).
  drawers(drawer3).
  drawers(drawer4).
  
  belongs_to(drawer1, person1).
  belongs_to(drawer2, person1).
  belongs_to(drawer3, person2).
  belongs_to(drawer4, person2).
  
  item(phone2).
  
  phone_in(drawer).
  phone_in(drawer2).
  </code></pre>
  
  <p><strong>commands to run and their results</strong></p>
  
  <pre><code>?- phone_in(drawer4).
  false.
  
  ?- phone_in(drawer3).
  false.
  
  ?- phone_in(drawer1).
  false.
  
  ?- phone_in(drawer2).
  true.
  </code></pre>
  
  <p><strong>I am trying to write a condition as following.</strong></p>
  
  <pre><code>?- phone_in(drawer2).
  true.
  </code></pre>
  
  <p>Want to run condition based on the result of above query (true/false).</p>
  
  <pre><code>if(false)
      write("phone not found!");
  else if(true)
      write("please found in your search area");
  </code></pre>
  
  <p>Please suggest me to improve my code.</p>