I am more familiar with python than I am with Model Builder so my solution involves a python script in your tool. Perhaps someone with more Model Builder experience can convert these processes.
Create a python script with the following code:
import arcpy
fc = arcpy.GetParameterAsText(0)
fieldA = arcpy.GetParameterAsText(1)
fieldB = arcpy.GetParameterAsText(2)
fieldC = arcpy.GetParameterAsText(3)
#I included the Add Field tool in this script, it is up to you if you keep it in here or prefer to work with the tool in Model Builder
arcpy.AddField_management(fc, fieldC, 'LONG') #Change field type here if not LONG
fields = arcpy.ListFields(fc, fieldA) # *explanation below
if len(fields) == 0:
arcpy.CalculateField_management(fc, fieldC, "!" + str(fieldB) + "!", "PYTHON_9.3")
else:
arcpy.CalculateField_management(fc, fieldC, "!" + str(fieldA) + "!", "PYTHON_9.3")
Save this script and add it to the toolbox where your model is saved, then open the script properties. Your Parameters are going to look like this:
Make sure to set the output as Derived and Output types, as shown in the image, the other parameters accept the defualt properties.
Drag and drop the script into your model. Make variables from all parameters except fc and connect your output from your iterator (or whatever your last process is) to the script as the fc parameter. Then treat the field parameters as strings and enter your two existing fields in fieldA and fieldB and your final desired field in fieldC. your model should look a bit like this:
*I am using the first field as the wildcard for the ListFields tool, so it will return a list that is empty if that field does not exist, or a list containing only that field.