Question: Thiruvananthapuram was the capital of what state?
Paraphrase: Which state has Thiruvananthapuram as its capital?
SPARQL (Wikidata):  select distinct ?sbj where { ?sbj wdt:P36 wd:Q167715 . ?sbj wdt:P31 wd:Q3024240 } 
Answer: Travancore