Can I have two different database on one server? not running at the same time off course.

let say I have database A and database B.

I want to be able to start one of these database from one server. because one will used for dev, and the other will be used for testing purposes.

appreciated.