Identifying a word-guessing game based on the players' role
I don't know if the game and the rules you played has a certain name, but the basis of this game looks like from Word Wolf, a Werewolf game with words. The rules you played might be a variation/house rules of this game.

Preparation: Players get their own words (or "role")


At least 4 participants, consisting of 1 GM and 3+ players
The GM thinks of 2 different-but-related words (e.g. "Tennis" and "Table tennis") and decides which one is the "villagers" (the majority) and the "werewolves" (the minority; usually 1, but can be more if there are enough players)
The GM writes these words on pieces of paper the same amount as the "villagers" and "werewolves", then fold and shuffle them (or anything to prevent the words easily guessed by the players and the GM)
Each player then picks a paper and sees the words without telling anyone. They don't know if they are "villagers" or "werewolves"!


Playing: Players trying to guess if they are "villagers" or "werewolves" by discussing the words without revealing them. The "villagers" trying to hunt the "werewolves", and the "werewolves" trying to mix-in with or deceive the "villagers". This phase seems to have many variations, but usually free-talk with time-limit (just like the original Werewolf)


The GM decides how long the round will be (e.g. 5 minutes), then starts the game
Each player is free to say/ask something to gather information based on the other players' response, while at the same time trying their best to hide their identity from anyone
When the round ends, the players simultaneously vote on who is the "werewolves" (a.k.a "lynching")
If the majority votes are on a "werewolves", then the "villagers" win. Otherwise, the "werewolves" win. (It seems there's no default tie-breaking system, though usually it's done by re-voting on the players with the tied vote only)


That's the basis of the game, though it is easily extended with variations/house rules, such as (the naming is arbitrary; it's my own idea):


Reversal: if the majority votes are on the "werewolves", then they are given a chance once to guess the majority word. If it's correct, then the "werewolves" win
Turn-based: instead of the time-limit, the GM decides how many turns in a round, then each player has 1 chance to say/ask something in each round
Sequential: instead of free-talk, each player in sequential says/asks something
Long game: just like the original Werewolf, instead of a single independent round, it is played until all "werewolves" got hunted (the "villagers" win), or the amount of "werewolves" equals the "villagers" (the "werewolves" win). Each round, the "lynched" player is eliminated from the game
Outsider: The 3rd word is added, and is deemed as "villager"
and possibly many more...