Sql Statement Like Pattern Matching Ocaml