You can put your basic condition first and all the rest as subparts. Then, you can repeat the all those subparts again after/outside the first one. As this sounds more complicated than it really is, let me illustrate with an example:

So, the main condition is to format the author (between {0}). If the author is available, then the subparts {1} and {2} are processed. Once those are processed, the variables Title and Year are used and will not be used again (unless you would add a ':r'
option to them). So since they are used, {3} and {4} will be empty and therefore not displayed.

If the author is not available, then {1} and {2} will not be executed and Title and Year will remain available for {3} and {4}.

Example output:

Cullity BD, Introduction to Magnetic Materials, 1972

INTRODUCTION TO MAGNETIC MATERIALS, 72

Your format string might become a bit long this way, but you should be able to achieve almost anything you want.

The solution I presented in the above post will always work. However, if the difference in formatting is minor (upper/lower case, or just another variable), you could use a shortcut with the or'ing (|) of variables. For your example, the following might
work:

{%Author:2|Title:u}{, &lt;b&gt;%Title%&lt;/b&gt;}{. %Edition:o% ed}.

This will display the author followed by the the title in bold. If there is no author, than the title in uppercase will be displayed. As that means the title is already used before, the title won't be displayed again in bold then.