title: Searching an int column on the basis of a string value
body: <p>I have a View <code>View_Booking</code> in sql server 2014:</p>
  
  <pre><code>bkID    bkSlot    bkStatus
  ----    ------    --------
  2       Lunch     1
  4       Lunch     1
  6       Dinner    0
  7       Lunch     1
  </code></pre>
  
  <p>While in c# I have used a gridview and casted <code>bkStatus</code> into string like:</p>
  
  <pre><code>&lt;asp:Label ID="lblStatus" Text='&lt;%# (Eval("bkStatus")+"" == "1") ? "Booked" : "Pending" %&gt;'
      ... &gt;&lt;/asp:Label&gt;
  
  bkID    bkSlot    bkStatus
  ----    ------    --------
  2       Lunch     Booked
  4       Lunch     Booked
  6       Dinner    Pending
  7       Lunch     Booked
  </code></pre>
  
  <hr>
  
  <p>Now I'm searching into View using this query:</p>
  
  <pre><code>SELECT * FROM View_Booking 
  WHERE CAST(bkID AS NVARCHAR(MAX)) LIKE '%" + keyword + "%' 
  OR bkSlot LIKE '%"+keyword+"%' 
  OR bkStatus LIKE &lt;&lt; ? &gt;&gt;
  </code></pre>
  
  <p>But don't know how to search for <code>bkStatus</code> which is passed as <em>string</em> from c# while it's a <em>int</em> in sql?</p>