If you're thinking of a Tom Selleck "sitcom," you're likely conflating two very different roles:
Not a sitcom—a detective drama with comedic elements. Selleck stars as Thomas Magnum, a charismatic private investigator living in Hawaii. The show blends case-of-the-week mysteries with ongoing character arcs, humor, and '80s action. It made Selleck a global icon (and the mustache legendary).
Selleck played Dr. Richard Burke, Monica Geller's (Courteney Cox) charming, older ophthalmologist boyfriend. He appeared in 9 episodes across Seasons 2 and 3. This was a traditional multi-camera sitcom role, showcasing his comedic timing against the ensemble.
So: Magnum for the iconic lead drama; Friends for the classic sitcom guest arc.