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***](https://boardgamegeek.com/boardgame/266098/word-wolf), a [*Werewolf*](https://boardgamegeek.com/boardgame/925/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")

1. At least 4 participants, consisting of 1 GM and 3+ players
2. 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)
3. 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)
4. 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*)

5. The GM decides how long the round will be (e.g. 5 minutes), then starts the game
6. 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
7. When the round ends, the players simultaneously vote on who is the "werewolves" (a.k.a "lynching")
8. 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 free-talk and time-limit, the GM decides how many turns in a round, then each player, in turn, 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...