If you get caught with drugs in thailand, you usually get an option, give the Police info about pother people selling larger quananties of drugs than you got caught with, and then walk free without facing persecution.
The caught Policeman was probably informed ion by another dealer who had gotton caught .