Consider some Mathematica notebook where there is some preliminary code followed by chapters, sections, and subsections that must be evaluated using the code. Say, there are Chapter 1, Chapter 2, where there are sections 1.1, 1.2, and the subsections 1.1.1 (in 1.1), 1.2.1, 1.2.2 (in 1.2).
Would it be possible to
Associate the chapters, sections, and sub-sections with some parameters (say,
Chapter 1-> "A",Chapter 2-> "B"), (1.1-> "First",1.2-> "Second"), (1.1.1-> "Green",1.2.1-> "Yellow 1",1.2.2-> "Yellow 2"),Launch only the subsection associated with the given keys entered in a dialog window? Say, if I subsequently choose "A", "First", "Green", then the subsection
Chapter 1/1.1/1.1.1will be launched?
Edit
I have found this question. So I select the particular cell including Chapter 1 and just some equality x = 12 below, add the tag "Chapter 1" in Cells/Cell tags/Add/remove cell tags, and use the following code:
nb = EvaluationNotebook[];
(NotebookFind[nb, #, All, CellTags];
SelectionEvaluate[nb]) & /@ {"Chapter 1"}
As far as I understand, there is a possibility to add particular tags for sections and sub-sections inside the chapter, and that's it. If there are elegant solutions for this problem, I would appreciate any help.

NotebookFind[EvaluationNotebook[], "Scope"]; SelectionMove[EvaluationNotebook[], All, CellGroup].CellTagsare probably safer than text search, but you need only tag the chapter heading cells. – Michael E2 Mar 14 '23 at 12:25