title: SQL Alchemy Filter rows based on the values contained in cells of other column
body: <p>I am new to python and SQLALCHEMY, and I came across this doubt, whether can we filter rows of the table based on cell values of the column of same table. 
  example:</p>
  
  <pre><code>Sbranch=value
  result=Transaction.query.filter(Transaction.branch==Sbranch)
                            .order_by(desc(Transaction.id)).limit(50).all()
  </code></pre>
  
  <p>if the value of <code>Sbranch=0</code>, i want to read all the rows regardless of <code>Sbranch</code> value, else i want to filter rows with contains <code>Transaction.branch==Sbranch</code>. </p>
  
  <p>I know that it can be achieved by comparing the values of <code>Sbranch</code>(if-else conditions),but it gets complicated as the number of such columns increases.
  Example:</p>
  
  <pre><code>Sbranch=value1
  trans_by=value2
  trans_to=value3
  .
  .
  result=Transaction.query.filter(Transaction.branch==Sbranch,Transaction.trans_by==value2,Transaction_to==trans_to)
  .order_by(desc(Transaction.id)).limit(50).all()
  </code></pre>
  
  <p>I want to apply similar filter with all 3 columns.</p>
  
  <p>I want to know if there is any inbuilt function in SQLALCHEMY to this problem.</p>