If you need to export your label with assigning specific indices, then you need to create a color table and specify that. Specifically you need to use this section of the Segmentations
module:
Also see this Segmentations — 3D Slicer documentation
The label value is index of the color table entry that has the same name as the segment name.