@NShini As a initial thought I could see this possible using the metadata tags on answers in your KB. This should help filter answers based on the tags i.e key value pair. For example:
Pair Question Answer Metadata
1 I want to drill a hole Power Drill Category: 1
I want to tighten a screw Category: 1
2 I want to smoothen surface File Category: 2
The documentation should help you get a better idea of its usage.
Since QnAMaker helps you to deploy a bot automatically after publish you would need to test the same directly from the portal to check if your KB is working as expected. That is, check if all the required answers are returned and then you can filter the metadata in the response in your client app or bot later.