First, the results you got should have not been any surprise since you used the standard SQL Query syntax (nothing specific to Visual Foxpro here) as MyVariable which 'tells' the query to make the new field named "MyVariable"
Secondly no field name may have a space in it so you will NEVER get a field named:
"A <space> name"
The best you could do would be to get a field named:
"A_name" where the underscore replaces your space.
You can use the CREATE TABLE command to build a new table - defining the field names and types.
Visual Foxpro data tables can be of 2 types.
* FREE tables - data tables which are not 'contained' in a VFP Database
* Database tables - data tables which are 'contained' within a VFP Database
Quite often many (if not most) of the data tables created and used are FREE tables.
With FREE tables, field names have more constraints than do the field names of Database tables.
You should probably use your VFP Help system to learn more detail
In your Command Window type: HELP system capacities and/or spend some time looking at the free on-line (or downloadable) VFP tutorial videos at: Free Visual FoxPro Videos
which I have recommended to you multiple times.
From a purely SQL Query syntax perspective you could use VFP Macro substitution (using the ampersand character '&') to have your SQL Query field name
Your code syntax was 'telling' the SQL Query to use the literal "MyVariable" as the new field name.
Using the VFP Macro substitution would 'tell' the SQL Query to use the Contents of the variable MyVariable as the new Field Name
So instead of:
Select LotofValues as MyVariable;
You could try:
MyVariable = "FldName"
SELECT LotofValues as &MyVariable;
INTO CURSOR Results