There is a parameter called "Function" but this parameter is a "text" data type, but Revit does not allow an IF conditional statement where the main condition is text. Therefore, we need to create a dummy field (hidden) to hold the value of an integer, which we can be used in an IF conditional statement.
From the door schedule, use "Add parameter". Create an instance parameter as integer, named such as "Exterior". Then, in the schedule, enter an integer value like this: if the door is interior enter a 0 ; if the door is exterior enter a 1. Then, add a text parameter, but this time click on "Calculated value", and name this parameter such as: "To Room" , where this formula:
IF (Exterior = 1, "Exterior", To Room: Name)
In English, that means: If the value of the "Exterior" field is 1, set the value of my "To Room" field as "Exterior" ; otherwise, use the value of the "To Room:Name" field.
After doing this, hide the old "To Room:Name" field from the schedule, and leave the new "To Room" field, which is going to show the same values of "To Room:Name", except that now "To Room" will show the word "Exterior" in all the rows where the value of the "Exterior" parameter is 1.