Imagine a person X who chooses to ignore his/her responsibilities and family at will, only to attend to them when he/she sees a tangible gain to be had out of it.
Selfish is one option, but I'm looking for something more specific.
You might call them a fair-weather friend:
Someone who stops being supportive or loyal when you run into difficulties and need help.
Basically, a fair-weather friend is there for you when it's convenient for them, but when they'd actually have to do something for you, suddenly they disappear.
Self-centered. If the individual is acting out of spite, passive aggressive.
~... " inconsiderate"- adj, lacking regard for the rights or feelings of others. (vocabulary.com)
I'm not sure if this is good English or not, but I've heard the term functional in the form, "For Dave, friendship is functional. He'll be friendly when there's something to be gained."
I would most definitely call this person unreliable in the English Language.
"I was supposed to be meeting Erin for lunch, but she didn't turn up because it was her turn to pay. She's such an unreliable friend."
There's also Capricious, which means "Given to sudden behavior change". This could attribute to a sudden change in circumstances that lead to a friendship not being "profitable" for them anymore.