We don't know whether you gave the security deposit money to the landlord or to your roommate. If you gave it to your roommate, you need to try to get it back from your roommate. If you gave it to your landlord, you still have an issue that (apparently) you were not on the lease but your roommate was - meaning that the refund would go to your roommate and you might have a problem convincing a court that any portion of it should be refunded to you. But you're making us guess.