Custome Depth Pass on only one Material of a Static Mesh

Is it possible to render only one Material of a Static Mesh to the custom depth pass and not the hole mesh? Or is there maybe another option to render only one part of a mesh to a Custom Render Depth Pass, because I can’t find any information on the topic.