The Andy Griffith Show
If I Had a Quarter Million Dollars (5x22)
:
Barney sets up a sting operation to catch a crook who may be returning to Mayberry for some stolen loot and ends up arresting an undercover FBI agent instead. But a suspicious Andy realizes Barney's operation may not have been as far off as he thought.