You need to give more information.
I understand you want to power an AC appliance (what voltage, current?) either directly from wall power, or from a battery source through an inverter, and have the option to charge the battery (voltage, capacity?) from the same wall power outlet. That of course can all be done.
High voltages are not easy to deal with safely, you have to know what you're doing. Many parts (the inverter, the charger) are best bought off the shelf.
Switching can be done with relays or in solid state - the latter is much faster and allows for better control (zero-crossing switching, seamless transfer between power sources similar to a UPS), but is harder to implement. High voltages can kill you; high currents can cause smoke and fire; the combination can cause explosions.