A member made of steel will generally be more rigid than a member of equal load carrying ability made of cast iron
A member made of cast iron will generally be more rigid than a member of equal load carrying ability made of steel
Both will be equally rigid
Which one is rigid will depend on several other factors