Simple answer to this is that you "Could" do it - but its impractical and close to impossible.. Simple reason is that you can have many similar Questions that can mean exactly the same. With SQL query you have specific syntax you have to keep in order to get data... with standard language you have potentially 100's of different syntax to get same thing. Mapping this into SQL language is very impractical and close to impossible.
Yes you could force the user to use specific words or specific question format so your program can interpret them as SQL queries - but than again this is breaking the paradigm of what you want to achieve isn't it
Edit:
Since you are soooo desperate ;) you could "potentially" do something like this
Lets imagine a very simple Query
SELECT * FROM USERS WHERE AGE = '20';
What are the possible Human language questions?
- Can you show me all people with age of 20?
- Display humans with the age of 20
- How many people in this group have age of 20?
- How many people in this table have 20 years ?
- Do we have any people aged 20 ?
- Search for all people with age of twenty
What you could then do is create some sort of Map
where ie.
Key = USERS;
Value = people, humans,
And another Map
Key = SELECT;
Value = Can you show me, Display, Do we have, Search, How many;
And so on so forth - This will create a complex map with all possible phrases that can mean the same thing and correspond to a given SQL query syntax element. This may not be the best solution but it's what I would probably do - at least this is what I would start with