After reading your question a few times over, I found that the way that I initially interpreted what you were asking for was not what you were actually asking.
You are not asking...
"How can one go about authoring a snippet whose output is contingent on text-input received by the user..?"
...rather, you are asking...
"How can one go about adding dynamic text-input support to snippets, such that the end user can create snippets whose output is contingent on the input received from the user..?"
In not so many words...
One asks how to do something, and the other asks, how to add support for doing something (in this context, "that something" is dynamic text-input in VS Code snippets).
You need to use the "VS Code API" to add support for dynamic text-input to snippets because "VS Code's dynamic input variables mechanism" does not extend support to the snippets configuration file. By default dynamic input can only be defined by the user in a VS Code Tasks context whose environment can be worked in using a "launch.json" file located @ "./.vscode/launch.json`.
"VS Code extensions built from the VS Code API" are however, quite proficient at getting (as well as setting & moving) dynamic input from the user then setting it in some arbitrary place (i.e. snippets, keyboard shortcuts, etc...).
I included a bunch of links that cover everything I wrote about. The links included are very helpful, and well written.
There are already extensions (as mentioned in the comments) that can provide support for dynamic snippets input, if you don't want to write one, but sometimes writing an extension can be the best solution, its really on a case by case basis.
Also, how you get the input from the user can be achieved by a myriad of different methods, for example:
The A.P.I. can fetch a dynamic value from...
The Quick-input Menu
(for example: pressing F1 key)
From Inside the Editor
(You can even specify specific lines & line-col values)
Entity names. (i.e. function names, variable names, parameter names, etc...)
You can even develop, design, and render your own menu to get input from via context menu_
-You can let the user define how they want to input the text by contributing your own custom settings
The links in the list just above this text should really help if you decide to add the functionality yourself.