A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
There are no alternatives. All you see on that page is dead functionality, and earlier this afternoon I submitted feedback on that topic that should wipe out that text and say that the function always returns NULL.