Hi Das,
After thinking a bit more about this, you do not have a coding problem, but you have a data problem. You are trying to define your subtopics in your app, but you have different subtopics for every category and I assume that the keywords may not be the same for every subtopic-category combination.
What I think you need is a google sheet with the following columns:
keyword, subtopic, category
For example, one row may be:
adaptation, climate change, geography
Then, you do not want to repeat subtopic definitions, because that becomes a maintenance nightmare, you need an additional sheet that has as columns:
subtopic, category, subtopic definition
so, for example, a row my be:
axial tilt, geography, The angle of earth's axis
You may also decide to split up this large big sheet into a sheet for every category, because it seems that the keywords are not applicable to all categories and that you have a lot of empty spots.
After you have done this, you will have a clear separation of data, which becomes a lot easier to maintain and where you never have to change the app if new data becomes available. That has as a clear advantage that you do not need to send new versions of you app to your users every time you make an update.
The AppInventor code will then be rather straightforward, along the lines of my example app. I can understand that this code is not easy to grasp, because it is abstract and generic. but, we are here to answer questions (sometimes).