How to calculate battery ratings for your solar panel?
Then I will be needing a battery with a rating of above 23 ampere hours since 5 kWh/220 V is equal to 23 ampere hours.


This is only true if your battery bank is 220 V too. If, for example, you have a 48 V battery bank then your required Ah capacity is given by 5 kWh / 48 V = 100 Ah (approx.).


  
  I want to ask if a battery is of 23 A and it runs for an hour VS a 1 ampere battery which runs for 23 hours. Will they be both accurate as a battery backup for solar panel? Because they both makes 23 Ah.
  


In practice, no. The Ah rating will decrease when the discharge rate is increased. The battery datasheet should quote that.



Figure 1. A lead-acid battery discharge for various discharge rates. Source: Samlex Solar.


  
  And if yes, then I wonder how this 1 ampere battery will provide current to my household? My appliances won't run, will they?
  


Yes, but only if you stay below the rated current (which isn't much).


  
  If no, then why do we even calculate ampere hours when they are of no use?
  


They are of use but they are only one of the specifications you need to assess when designing a system. The discharge rates (Figure 1) are another, maximum charge rate, etc., all have to be considered.