How to use conditional fields settings?
You can hide or show fields in the add listing form with the Conditional Fields feature.
How to Add Conditional Fields?
Conditional Fields settings can be found inside the individual field settings in the Custom Fields tab.
CPT > Settings > Custom Fields > Edit Fields -> Conditional Fields
Make field conditional based on a category of the listing
It is possible to show or hide a field based on whether a category is or isn't present on the listing.
Use the "contains" to pick your value out of the list of categories stored with the listing.
Use the Category ID instead of the category name. For example, if the category "Attractions" has Category ID 22, then place 22 in the match column.
GeoDirectory's Conditional Filters for Advanced Search
Advanced search addon allows you to make search filters conditional, too.
This is especially targeted to support filters 'by category'.
You can set up first a multi-select field in a CPT that only shows based on a category like shown above.
Then in the search configuration you can display that filter only if the visitor has already engaged a category filter using the id of the category, as shown in the screenshot below.
Read more about Advanced Search Filters here.