Here is how I did it. I explained this step by step so that any newbie did not have to go through all the Jmeter docs to find out.
Step 1. Create a thread group.

I named the thread group as the Demo Test Group .
Step 2. Creating a while controller

A So far, the controller has been created in the demo test group.
Step 3. Create a new variable named path in the status section.

Step 4. Creating a CSV Dataset Configuration

The CSV set configuration is created inside the While controller.
Step 5: Configure the CSV Dataset.

Make the changes highlighted in the field. Inside the File Name section, enter the location of the csv file.
The location of the CSV file should contain only the path. This is what my CSV file looked like.

The value inside the variable names is the same as the variable name in the While controller. This is the way.
Step 6. Creating an HTTP Request

Inside the While controller, create an HTTP request.
Step 7: Configure the HTTP Request

I entered the domain name, protocol and in the "Path" section I entered the {path} variable, which is selected from the CSV file.
Step 8: Add Search Results Tree

You need to add a listener to the HTTP request. His goal is to listen to the answers.
Step 9: run the test

The final step is to run the test.
You can see that the answers are collected inside the View result tree .