You shouldn’t get fired anyways, but here in Spain if you miss work because you are sick you need to have a note from your doctor justifying that staying at come was the correct choice, so you wouldn’t be able to call in sick.
You wouldn’t be able to be fired either, the company needs several heavy failures from a worker to be able to legally fire them. Companies usually decide to lay off people instead. Since you didn’t go to work, the company would be entitled to subtract whatever they pay you in the hours you weren’t there (which is way more than what you end up getting post taxes, so be prepared to earn way less than the days you missed), so there would be SOME consequence.