title: MySQL Update column if value equal to any value of an array
body: <p>I have a table with a column that store a number. I also have 2 different array: the first one store the value to check, the second one store the new value to save in the column.<br>
  I need a query that check if the value in the column is equal to any value of the first array and if it is true update the column value with the same position value of the second array.<br>
  For example:</p>
  
  <pre><code>column value = 2
  firstArray = [1, 2, 3]
  secondArray = [5, 6, 7]
  </code></pre>
  
  <p>I want to check if 2 is in firstArray: yes... it is equal to firstArray[1]
  then I want to update the column value with secondArray[1]
  at the end of the query column value will be 6.</p>
  
  <p>It is possibile?
  I found this <a href="https://stackoverflow.com/questions/9188966/mysql-update-a-columns-if-certain-value">MySQL: Update a columns if certain value</a> but I'm really new in querying MySQL and I don't know how to make it work in my case.<br></p>
  
  <p>Thanks for the help<br>
  Daniele</p>