Is a sword useful for self defense in doors?
Not really.
as long as there's enough room to swing it
Define sword. Short swords can be pretty useful, larger and longer ones can be stuck in things. Watch the ending of "twilight samurai" for more information.