In addition to the observation that @tenebris2020 made about the "no matter which" meaning, "whichever" can also mean "either one [that]" or "any one [that]".
Choose whichever dress flatters your figure the most. [any one dress that flatters...]
In very casual speech, you can even use "whichever" all alone to express complete indifference to the result of a choice (I do this all the time):
Q: Do you want red wine or white wine with dinner tonight?
A: Whichever. [meaning "either one"]
Note that you use "whichever" when selecting a single option from a fixed set of options (one dress out of your wardrobe, or one out of two types of wine in my examples). You use "whatever" for choosing among an unrestricted set of options, and "whatever" might also mean choosing more than one thing from that set:
She eats whatever she wants. [anything from an unrestricted set of options]
The same pattern applies to the other "...ever" words:
Visit whenever you want. [at any time]
Invite whomever you'd like. [any person]
I need to get to the hospital however I can. [by any method]