Python Match Case Substring In Sql