There are multiple conditions that need to be met. Including ceiling height, means of egress and other building codes. The best answers can be recieved from your local inspectional services/building department in your local municipality. There are often special conditions in every home that will need to be addressed that are specific to each home and any plan would need to be reviewed by the city/town and done by licenced contractors and/or done to current building codes.
Good luck, hope that helps,