I am not sure it is clear what you are asking for here.
I understand it is based on the value of a custom field (if field = X, then do Y, else do Z), but not what
Do you mean you want to block or allow a transition based on a value in a custom field? Or you want to change the end status of a transition? Or you are trying to perform a second transition within the current one in some cases?