You're likely thinking of a game where declaring or naming a specific card is a scoring mechanic. Several games fit this—here are the top candidates.
With those details, I can pinpoint the exact game and explain the naming/scoring rule.