If you look at the documentation for Binding.makeTwoWay Binding | GoJS API or for Binding.backConverter Binding | GoJS API, you will see that the converter will be given, in addition to the new value as the first argument, the data object and the model as the second and third arguments.
So if your link data were something like:
[
{ from: 1, to: 3, a: "A", b: "B", c: true },
{ from: 2, to: 4, a: "AA", b: "BB", c: false },
]
then your TextBlock could be something like:
$(go.TextBlock, { editable: true },
new go.Binding("text", "", data => data.c ? data.a : data.b)
.makeTwoWay((val, data, model) => model.set(data, data.c ? "a" : "b", val)))