Python Match Case Substring Method Sqlite Db