Maybe you can make a conditional field. But you will need to work on elaborating these fields to accomplish it, so that you adjust your proper structure. Unfortunately, I did not properly understand your goal.
{{#B}}
This text is only shown if B has text in it. Here is B: {{B}}
{{/B}}
{{^B}}
This text is only shown if B is empty. Here is A: {{A}}
{{/B}}
Multiple reveal steps are generally a sign that your cards are more complicated than they should be, but they can be approximated with Field Replacements - Anki Manual