How to execute single scenario out of multiple scenarios in a script?

I have a script with multiple scenarios. Each scenario does CRUD operations on a unique content type. I would like to reuse same script to run all scenarios at same time or single scenario as the need be. How to achieve this?

Yes, you can easily do this with k6 environment variables, like this:

import http from 'k6/http';

let scenarios = {
    contacts: {
        executor: 'constant-vus',
        exec: 'contacts',
        vus: 50,
        duration: '30s',
    },
    news: {
        executor: 'per-vu-iterations',
        exec: 'news',
        vus: 50,
        iterations: 100,
        maxDuration: '1m',
    },
};

export let options = {
    scenarios: {}, // to be set later
    // ... whatever other script options you have
}

if (__ENV.scenario) {
    // Use just a single scenario if `--env scenario=whatever` is used
    options.scenarios[__ENV.scenario] = scenarios[__ENV.scenario];
} else {
    // Use all scenrios
    options.scenarios = scenarios;
}

export function contacts() {
    http.get('https://test.k6.io/contacts.php');
    // ...
}

export function news() {
    http.get('https://test.k6.io/news.php');
    // ...
}

k6 run script.js will run the test will all of the scenarios enabled, while k6 run --env scenario=contacts script.js or k6 run --env scenario=news script.js will run it with just a single scenario.