It is a very complex question for me. I think you can refer to Practical Guide to ASME B31.3 - Process Piping Chapter 5. There is a brief description of material selection in it.
As Robin said it is difficult to answer this question clearly.But generally piping material slection depends on many factors such as:
1)Type of service-corrosive, erosive,...
2)Design temperature, which many other parameters like creep,toughness are effected
3)design pressure
4)compatibility with fluid
5)enviromental conditions
6)economics