title: How to find a flag (int) value based on a Hex value in a table?
body: <p>I need help on something quit confusing but I will try to be very specific. Thanks in advanced.</p>
  
  <p>I have a column in a table (SALES) called FLAG (bigint). 
  This value is calculated based on a Hex results which I am not entirely sure. what happen is that depending of the flag number means different outputs as per table below:</p>
  
  <p><a href="https://i.stack.imgur.com/ECMd3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ECMd3.png" alt="enter image description here"></a></p>
  
  <p>So depending of the value on the FLAG field, it will tell me the meaning and how many meanings that Flag is holding. </p>
  
  <p>My question is, in the database I only have the FLAG number, for example value "8209", how can I find out all records that contain the "Value (Hex) = 2 (Apple). I don't care for anything else as long as I return all FLAGS that have the 2 (Apple) tick?</p>
  
  <p>Thanks a lot for the help. </p>