Conditional Selectboxes

Hello,
im new with select2 and wonder how to create conditional selectboxes.

Is there a function to directly link them or do i have to use the ajax-options?

Thank you very much in advance!