Python Match Case Substring Mysql