Question: > 
> How do you like your coffee?
> 
> 
> 

Can I use the above sentence either on an offering situation that I ask if they like it black or with sugar, or during having situation that I ask if the coffee tastes good?

When the latter is possible, can next both answers be possible? 

1. I like it a lot.
2. It's good.

Answer: 
Beyond the answers given by other contributors, I would also add another parse:

If asked at a bar at night, when the other party is clearly not drinking coffee, the individual who asked may be implying that they will be making coffee for the other party the following morning; that is, it could also serve as an implicit pick-up line.
It's easier to see the meaning if you expand the two sentences to avoid the ambiguity:

> 
> How do you like your coffee [to be]?
> 
> 
> 

And the second definition:

> 
> How do you like your coffee [in front of you]?
> 
> 
> 

---

The latter is usually instead said without the "how" (in fact, I have a feeling including the "how" is grammatically incorrect), just as:

> 
> *Do you like your coffee?*
> 
> 
> 

Or even more clear: 

> 
> *How is your coffee?*
> 
> 
>