You may either use setter links or the <<link>> macro.
Example → setter link:
[[You name him George.|Some Passage][$name to "George"]]
[[You name him Mud.|Some Passage][$name to "Mud"]]
Example → <<link>> macro:
/* Using separate arguments. */
<<link "You name him George." "Some Passage">>
<<set $name to "George">>
<</link>>
<<link "You name him Mud." "Some Passage">>
<<set $name to "Mud">>
<</link>>
/* Using wiki links. */
<<link [[You name him George.|Some Passage]]>>
<<set $name to "George">>
<</link>>
<<link [[You name him Mud.|Some Passage]]>>
<<set $name to "Mud">>
<</link>>