You can't opt to fail a dice roll
Check this related answer.
You can, though, describe your action as "trying to fail something in a specific way", and then the DM might want you to roll to see if you "succeed at failing".
Remember, D&D5e has the following pattern:
- The DM describes the environment.
- The player describes what they want to do.
- The DM narrates the results of the adventurers' actions.
So, instead of the PC's action being "I cast dispel magic" and opting to fail it, their action can be "I try to fail-cast dispel magic". It's up to the DM how to resolve the results of this action. It is clearly a different action than actually trying to cast the spell.
First Scenario
For your first scenario, you could actually just target the harmful magical effect that you want to remove, the way I read Dispel Magic. If you expand it to two harmful effects and one good, you are out of luck, though. The best you can do is to describe your action as "I try to dispel only the harmful effects" - it's up to the DM if you can do it. By RAW, spells do only what they say and you can't force-fail a check, so you can only dispel (or try to) everything on the creature using the action "I cast dispel magic on this creature".
Remember the actions are something the characters do. "Failing a check" is not something a character does, so "I cast the spell and fail the check on the good effect" is not a description of an action.
Second Scenario
For the second scenario, remember that if a spell has worked or not is only known through its effects. The way I understand the rulings, there is no difference between you randomly doing some gestures and casting a spell with Somatic components, except if the spell works, which will be noticed by the effects. This question has some answers that deal with this "perception of failing a spell".
If you want to pretend to cast a spell, this is more like a Performance Check (doing something close to the Verbal and Somatic components, without actually casting the spell) contested by an Arcana or Insight check than actually casting the spell and failing. This is certainly something you can do, but it might not be the best option if you are a Wizard with low Cha and without Performance proficiency.
Instead of pretending, you could describe it on the lines of "I slightly change the spell in a way I know it won't work", which might be an Arcana check.
The point is: the rolls are supposed to check if you can succeed at your action. "Failing deliberately" is an action, and you might have to succeed at the dice roll to do it correctly. The DM can decide it is trivial to "succeed at failing" and not require the roll, though.