[ENH] case_when function
- [x] closes #39154
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

Continues the work started by @ElHoussineT(#50343)

- uses `pd.Series.mask` under the hood
- function implementation, as well as a Series method

@rhshadrach @phofl @erfannariman @mroeschke could you kindly have a look at this PR? what's the proper way to tag reviewers? Thanks  @mroeschke @rhshadrach made some changes based on your feedback. Looking forward to your feedback. Thanks > Just focusing on the core behavior for now.

@rhshadrach made some changes to the code. Let me know your thoughts. Thanks  Thanks for the ping @samukweku - going to get to this either tonight or tomorrow. @rhshadrach getting some unrelated failing tests. I have also updated the code based on your feedback. had issues with my repo, so I had to delete and reinstall. I do not know how to reconnect with this PR.  opened a new [PR](#56059). @rhshadrach if there is a git fu to connect to this, I'll gladly run it. thanks reconnecting to this PR