First create CSV field and then make choice "Collection ids to csv" for interface
Select related collection
Adjust display template for records
Enable multiple value to be possible (in case of M2M relations) or keep to be single value
Now : there is possibility to configure conditions for others field dependent on this field value/values