... it all depends ...
In the Kontakt instruments I have here, key-switching to select a different articulation is done by sending a particular MIDI note to Kontakt. Just add them to your MIDI clip (or play them from your MIDI keyboard).
Different library developers use different keys for articulations (check their User Guides). So the precise method will differ too.
Here is a simple example, using a Factory Library instrument:
>>>
https://i.imgur.com/HoNigKl.png
-- the articulation keys are indicated in red / green on the Kontakt keyboard
-- and shown in the GUI (they can be selected there too)
-- the playable keys are blue
And a MIDI clip (I typed in the articulation names as Note Names):
-- the first few notes are played with the Sustain articulation
-- the others are Pizzicato.
Which particular libraries are you using?