title: SQL multiple words search, ordered by number of matches
body: <p>I'm trying to compose an SQL SELECT query with multiple search words. But I want the result be ordered by number of words matches.</p>
  
  <p>For example, let the search string is "red green blue". I want the results which contains all these three words on top, after that the results, which contains two of them, and at the end - only one word matches.</p>
  
  <pre><code>SELECT
      *
  FROM
      table
  WHERE
      (col LIKE '%red%') OR
      (col LIKE '%green%') OR
      (col LIKE '%blue%')
  ORDER BY
      ?????
  </code></pre>
  
  <p>Thanks in advance!</p>