I have been working on a database application in C2 and ran into the same problem. There is no "easy" solution, but there are a few ways to get close to what you want. First, you could try using the Dictionary object. It allows you to define names, then get the value associated with that name in an expression:
so, you would have a Dictionary with: "bob":1 "kitty":2 "joe":3 "mary":4... "HP":1 "power":2 "speed":3...
then, when you want to lookup bob's HP you would use: stat.at(Dictionary.Get("bob"), Dictionary.Get("HP"))
Since I am working with a MySQL database, I have the calls to the database return the field names as well as the data, then use TokenAt to find what I am looking for, because the query could return fields in different positions depending on what I ask for - so I can't assume they will always be in the same place.
EDIT: and of course, you can create a general purpose Function called LookupStat (or whatever) and pass in the name, and the stat you want.
then you could have: value = Function.Call("LookupStat", "bob", "HP")
in the function you would have Function.Set Return Value to stat.at(Dictionary.Get(Function.Param(0)), Dictionary.Get(Function.Param(1)))