You could also do this with a SWITCH CASE statement, & then code it into your own Gosub Function like GosubStr(string value).
Ensure you specify a DEFAULT CASE or some error checking in case the string provided doesn't exist as a label.
I'll try to see if there is a DLL out there to do this. I'm sure Ian M has one (As he seems to have a DLL for everything!)
I'm not at a computer right now with DBpro installed and I don't want to give you code that doesn't work. I'll be home in about 2 hours, and I'll edit an example in to this post.