Hello @Tosin
Welcome to the Wefugees community and thank you for your question.
Concerning your appeal in court I can't tell you how high your chances of success are.
Regarding the information you gave us in the second paragraph I can say that it's probably not sufficient to grant you a residence permit. Working or doing an Ausbildung do not suspend deportation after rejection in the asylum procedure. Or do you have an Ausbildungsduldung (a Duldung that allows you to stay for the duration of your Ausbildung plus 2 additional years)?
Unfortunately having a baby with someone that you are not married to doesn't grant you the right to stay automatically either. You need to have Sorgerecht in order to get a so-called "Aufenthaltserlaubnis zur Personensorge" (residence permit to take care of the child).
In addition to my answer I will link @WKZB1 of Willkommenszentrum Berlin. He will take a **** at your question tomorrow and might be able to add some information that I missed out.
Best regards,
Thorgen