In a formal way, use <<Ça m'est égal>> and it means "It is all the same to me", a very polite way of saying.
In an informal way, use <<Je m'en fiche>> and it means "I don't give a damn"
If you want to say "It doesn't matter", you would better off with <<C’est égal>>.